package com.design_pattern._03_behavioral._01_visitor;

public interface ComputerPartVisitor {
    public void visit(Computer computer);
    public void visit(CPU cpu);
    public void visit(Mouse mouse);
    public void visit(Keyboard keyboard);
    public void visit(GPU gpu);
    public void visit(Memory memory);
}

class GameVisitor implements ComputerPartVisitor{
    @Override
    public void visit(Computer computer) {
        System.out.println("开始装机：");
    }

    @Override
    public void visit(CPU cpu) {
        System.out.println("单核性能好");
    }

    @Override
    public void visit(Mouse mouse) {
        System.out.println("游戏鼠标");
    }

    @Override
    public void visit(Keyboard keyboard) {
        System.out.println("游戏键盘");
    }

    @Override
    public void visit(GPU gpu) {
        System.out.println("英伟达4080");
    }

    @Override
    public void visit(Memory memory) {
        System.out.println("32G内存");
    }
}